#ifndef __CK_ELEMENT_REPOSITORY_MYSQL_H__
#define __CK_ELEMENT_REPOSITORY_MYSQL_H__

#include "ckElementRepository.h"

namespace ck
{
	class ElementRepositoryMySQL : public ElementRepository
	{
	public:
		ElementRepositoryMySQL();
		virtual ~ElementRepositoryMySQL();

	protected:
		virtual RESULTCODE	AddCheckElement(const char* szName, z_int32 nElemCode, z_int32 nSubElemCode, z_int32 nItemCode, z_int32 nType);

	protected:
		virtual void	BuildInitSQL(char* szSQL, size_t nSize);
		virtual void	BuildGetElementsSQL(char* szSQL, size_t nSize);
		virtual void	BuildGetElementsSQL(char* szSQL, size_t nSize, z_uint32 nCodeMin, z_uint32 nCodeMax);
		virtual void	BuildGetElementByCodeSQL(char* szSQL, size_t nSize, z_uint32 nCode);

		virtual void		BuildMountOperatorSQL(char* szSQL, size_t nSize, z_uint32 nItemCode, z_uint32 nOperCode, z_uint32 nModuleCode);
		virtual void		BuildUnmountOperatorSQL(char* szSQL, size_t nSize, z_uint32 nItemCode, z_uint32 nOperCode);
		virtual void		BuildIsOperatorMountedSQL(char* szSQL, size_t nSize, z_uint32 nItemCode, z_uint32 nOperCode);
	};
}


#endif //__CK_ELEMENT_REPOSITORY_MYSQL_H__
